//
//  BeautyTableCell.m
//  BobNews
//
//  Created by lanou3g on 16/5/6.
//  Copyright © 2016年 liu. All rights reserved.
//

#import "BeautyTableCell.h"
#import "UIImageView+WebCache.h"
#import "BigImageView.h"
@interface BeautyTableCell ()

@property (weak, nonatomic) IBOutlet UIImageView *imgsrcView;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *upTimesLabel;
@property (weak, nonatomic) IBOutlet UILabel *downTimesLabel;
@property (weak, nonatomic) IBOutlet UILabel *replyCountLabel;


@end

@implementation BeautyTableCell

- (void)awakeFromNib {
    // Initialization code
}



- (void)layoutSubviews {
    [self.imgsrcView sd_setImageWithURL:[NSURL URLWithString:self.model.imgsrc]];
    self.titleLabel.text = self.model.title;
    self.upTimesLabel.text = [NSString stringWithFormat:@"%@",self.model.upTimes];
    self.downTimesLabel.text = [NSString stringWithFormat:@"%@",self.model.downTimes];
    self.replyCountLabel.text = [NSString stringWithFormat:@"%@",self.model.replyCount];
    self.imgsrcView.userInteractionEnabled = YES;
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(imgsrcViewAction:)];
    [self.imgsrcView addGestureRecognizer:tap];
}

- (void)imgsrcViewAction:(UITapGestureRecognizer *)tap {
    [BigImageView showImage:self.imgsrcView];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
